package com.orm;

import java.util.List;

/**
 * Created by lirance on 16/4/5.
 */
public class GetUsersService extends Service {

    @Override
    public List<Entity> getAllEntities() {
        return getAllDao().getUserDao().getAllUsers();

    }
   /* public Entity getEntitiesbyID(int id) {
        return getAllDao().getUserDao().getUserEntityByid(id);
    }
    public Entity getEntitiesbyIp(String ip) {
        return getAllDao().getUserDao().getUserEntityByip(ip);
    }
*/
    public List<Entity> getEntitiesbyID(int id) {
        return getAllDao().getUserDao().getUserEntityByid(id);
    }
    public List<Entity> getEntitiesbyIp(String ip) {
        return getAllDao().getUserDao().getUserEntityByip(ip);
    }


    @Override


    public void insert(Entity entityRef) {
        getAllDao().getUserDao().insert((UserEntity) entityRef);

    }

    public void delete(Entity entity) {
        getAllDao().getUserDao().delete((UserEntity) entity);
    }

    public void update(Entity entity) {
        getAllDao().getUserDao().update((UserEntity) entity);
    }
}

